package com.example.familylibrary.repository;

import com.example.familylibrary.entity.ReadingProgressEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface ReadingProgressRepository extends JpaRepository<ReadingProgressEntity, Long> {
    Optional<ReadingProgressEntity> findByUserIdAndBookId(Long userId, Long bookId);
    List<ReadingProgressEntity> findByUserId(Long userId);
    List<ReadingProgressEntity> findByBookId(Long bookId);
}